package com.bx.imserver.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @ClassName: BatchConfig
 * @Description:
 * @Author guochuang
 * @Date 2024/7/27
 * @Version 1.0
 */
@Slf4j
@Component
public class BatchConfig {

    @Bean
    public String cusSimpleRabbitListenerContainerFactory(SimpleRabbitListenerContainerFactory containerFactory) {
        log.info("设置批量-----");
        containerFactory.setBatchListener(true);
        return "cusSimpleRabbitListenerContainerFactory";
    }
}
